package Month09.day0919.CSDN;

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        Rectangle r = new Rectangle(sc.nextInt(),sc.nextInt());
        Circle cir = new Circle(sc.nextInt());
        Square squ = new Square(sc.nextInt());

        r.GetArea();

        String key = String.valueOf(cir.GetArea());
        BigDecimal key1 = new BigDecimal(key);
        String result = String.valueOf(key1);//这一步上面全部都是为了把double类型的数字转换为String
        String[] res1 = result.split("\\.");//把这个数字从小数点化为为两段
        char[] res_2 = res1[1].toCharArray();
        if(res_2.length > 1) {
            char[] res2 = res1[1].toCharArray();
            int count = 0;//计数器，用来记录后续是部分输出还是全部输出
            for (int i = 0; i < res2.length; i++) {
                if(res2[i] != '0'){
                    count++;
                    break;
                }
            }
            if(count == 0) {
                System.out.println(res1[0]);
            }else{
                if(res2[1] != '0') {
                    System.out.printf("%.2f\n", cir.GetArea());
                }else if(res2[1] == '0'){
                    System.out.println(res1[0] + "." + res2[0]);
                }
            }

        }else{
            char[] res2 = {res_2[0],'0'};
            int count = 0;//计数器，用来记录后续是部分输出还是全部输出
            for (int i = 0; i < res2.length; i++) {
                if(res2[i] != '0'){
                    count++;
                    break;
                }
            }
            if(count == 0) {
                System.out.println(res1[0]);
            }else{
                if(res2[1] != '0') {
                    System.out.printf("%.2f\n", cir.GetArea());
                }else if(res2[1] == '0'){
                    System.out.println(res1[0] + "." + res2[0]);
                }
            }

        }

        squ.GetArea();

    }
}
